﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Smart
{
    public class DbCariAdres : Tablo
    {
        public int Id { get; set; }
        public int CariId { get; set; }
        public int AdresNo { get; set; }
        public string Adres { get; set; }
        public string Il { get; set; }
        public string Ilce { get; set; }
        public string Tel1 { get; set; }
        public string Tel2 { get; set; }
        public int SaticiId { get; set; }
        public byte ZiyaretPeriyodu { get; set; }
        public byte ZiyaretHaftasi { get; set; }
        public string OzelNot { get; set; }
        public bool Gun1 { get; set; }
        public bool Gun2 { get; set; }
        public bool Gun3 { get; set; }
        public bool Gun4 { get; set; }
        public bool Gun5 { get; set; }
        public bool Gun6 { get; set; }
        public bool Gun7 { get; set; }

        public DbCariAdres()
        {
            this.TabloAdi = "TBL_ADRES";
        }

        public override IEnumerable<string> BulkImport()
        {
            yield return "İndiriliyor...";
            string[] dt = BackOffice.Get.CariAdresList(new DateTime(1900, 1, 1));
            yield return "indirildi.";
            foreach (string item in SqlCeClient.Get.importRows(this.TabloAdi, dt))
            {
                yield return item;
            }
            yield return "Tamamlandı";
        }
    }
}
